
import { Injectable } from '@nestjs/common';
import { UserInterface } from './UserInterface';

@Injectable()
export class UserService {
  private readonly users:UserInterface[] = [{
    id: 1,
    name: 'John',
    age: 18
  }];

  addUser(user:UserInterface) {
    this.users.push(user);
  }

  findAll() {
    return this.users;
  }
}